<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <script>
    	var num1 = prompt('请输入第一个数：');
      var num2 = prompt('请输入第二个数：');
      var result = parseFloat(num1) + parseFloat(num2);
      alert('计算结果是：' + result);
    </script>
  </body>
</html>